<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	</head>
	<body>		
		<table class="table table-bordered table-hover">
			<thead>
				<tr style="background: #364150;color: white;">
				  <th width="80" >属性ID</th>
				  <th>属性名称</th>
				  <th>属性类别</th>
				  <th style="width: 60%;">属性值</th>
				  <th width="15%">操作</th>
				</tr>
			</thead>
			{{foreach from="$data" value="$v"}}
			<tr>
				<td>{{$v['trid']}}</td>
				<td>{{$v['trname']}}</td>
				<td>{{if value = "$v['class'] == 0"}}
				属性
				{{else}}
				规格
				{{endif}}</td>
				<td>{{str_replace('|', ',', $v['value'])}}</td>
				<td>
					<a href="{{U('TypeAttr/edit',array('trid'=>$v['trid']))}}" class="btn btn-warning">修改</a>
					<a href="javascript:if(confirm('确定删除吗？'))location.href='{{U('TypeAttr/del',array('trid'=>$v['trid']))}}'" class="btn btn-danger">删除</a>
				</td>
			</tr>
			{{endforeach}}
			<tr>
				<td colspan='5' align='left'>
					<a href="{{U('TypeAttr/add')}}" class="btn btn-primary">添加属性</a>
				</td>
			</tr>			
		</table>
	</body>
</html>
